package com.hmdp.constant;

/**
 * Redis常量类
 * 选中变量后Ctrl+Shift+U可将小写转为大写（快捷键）
 */
public class RedisConstants {
    /** 登录验证码key前缀 */
    public static final String LOGIN_CODE_KEY_PREFIX = "hmdp:login:code:";
    /** 登录验证码TTL */
    public static final Long LOGIN_CODE_TTL = 2L;
    /** 登录用户key前缀 */
    public static final String LOGIN_USER_KEY_PREFIX = "hmdp:login:token:";
    /** 登录用户TTL */
    public static final Long LOGIN_USER_TTL = 30L;

    /** 缓存空值TTL */
    public static final Long CACHE_NULL_TTL = 2L;

    /** 商铺缓存key前缀 */
    public static final String CACHE_SHOP_KEY_PREFIX = "hmdp:cache:shop:";
    /** 商铺缓存TTL */
    public static final Long CACHE_SHOP_TTL = 30L;

    /** 商铺类型缓存key */
    public static final String CACHE_SHOP_TYPE_KEY = "hmdp:cache:shop:type";
    /** 商铺类型缓存TTL */
    public static final Long CACHE_SHOP_TYPE_TTL = 30L;

    /** 商铺业务锁key前缀 */
    public static final String LOCK_SHOP_KEY_PREFIX = "hmdp:lock:shop:";
    /** 商铺业务锁TTL */
    public static final Long LOCK_SHOP_TTL = 10L;
    /** 商铺缓存逻辑过期TTL */
    public static final Long CACHE_SHOP_LOGICAL_TTL = 20L;

    /** 秒杀券业务key */
    public static final String SECKILL_VOUCHER_ORDER = "order:";
    /** 分布式锁key前缀 */
    public static final String LOCK_KEY_PREFIX = "hmdp:lock:";
    /** 秒杀券库存key前缀 */
    public static final String SECKILL_STOCK_KEY_PREFIX = "hmdp:seckill:stock:";
    /** 笔记点赞key前缀 */
    public static final String BLOG_LIKED_KEY_PREFIX = "hmdp:blog:liked:";
    /** 用户关注key前缀 */
    public static final String FOLLOW_KEY_PREFIX = "hmdp:follows:";
    /** 推送笔记给粉丝key前缀 */
    public static final String FEED_KEY_PREFIX = "hmdp:feed:";
    /** 商铺地理位置key */
    public static final String SHOP_GEO_KEY_PREFIX = "hmdp:shop:geo:";
    /** 用户签到key前缀 */
    public static final String USER_SIGN_KEY_PREFIX = "hmdp:sign:";
}
